//package com.wzh.controller;
//
///**
// * @description:
// * @author: WZH
// * @time: 2022/3/17 9:19
// */
//
//import com.wzh.model.ResponseMsg;
//
//import org.apache.rocketmq.spring.core.RocketMQTemplate;
//import org.slf4j.Logger;
//import org.slf4j.LoggerFactory;
//import org.springframework.beans.factory.annotation.Autowired;
//import org.springframework.web.bind.annotation.RequestMapping;
//import org.springframework.web.bind.annotation.RequestParam;
//import org.springframework.web.bind.annotation.RestController;
//
//import javax.annotation.Resource;
//
//@RestController
//@RequestMapping("/mqMessageController")
//public class MqMessageController {
//    private static final Logger log = LoggerFactory.getLogger(MqMessageController.class);
//
//    @Resource
//    private RocketMQTemplate rocketMQTemplate;
//
//    @RequestMapping("/pushMessage.action")
//    public ResponseMsg get(@RequestParam("id") int id) {
//        rocketMQTemplate.convertAndSend("first-topic","你好," + id);
//        ResponseMsg msg = new ResponseMsg();
//        msg.setSuccessData(null);
//        return msg;
//    }
//
//}